undo merging of the separate loop setting cell data with cell drawing loop
authorKristian Rietveld <kris@gtk.org>
Sat, 18 Jun 2005 12:11:26 +0000 (12:11 +0000)
committerKristian Rietveld <kristian@src.gnome.org>
Sat, 18 Jun 2005 12:11:26 +0000 (12:11 +0000)
2005-06-18  Kristian Rietveld  <kris@gtk.org>

* gtk/gtktreeview.c (gtk_tree_view_bin_expose): undo merging
of the separate loop setting cell data with cell drawing loop
(introduced in revision 1.280), since this breaks focus handling
wrt special cells.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-8
gtk/gtktreeview.c

index 28bae282d4859cb55a4727281c9cced835cb6295..5f7191907778795c35a3213e650d2c37bc71d56a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-06-18  Kristian Rietveld  <kris@gtk.org>
+
+       * gtk/gtktreeview.c (gtk_tree_view_bin_expose): undo merging
+       of the separate loop setting cell data with cell drawing loop
+       (introduced in revision 1.280), since this breaks focus handling
+       wrt special cells.
+
 Sat Jun 18 04:22:51 2005  Manish Singh  <yosh@gimp.org>
 
        * gdk/gdkcursor.h: remove GDK_CURSOR and GDK_IS_CURSOR, instance
index 28bae282d4859cb55a4727281c9cced835cb6295..5f7191907778795c35a3213e650d2c37bc71d56a 100644 (file)
@@ -1,3 +1,10 @@
+2005-06-18  Kristian Rietveld  <kris@gtk.org>
+
+       * gtk/gtktreeview.c (gtk_tree_view_bin_expose): undo merging
+       of the separate loop setting cell data with cell drawing loop
+       (introduced in revision 1.280), since this breaks focus handling
+       wrt special cells.
+
 Sat Jun 18 04:22:51 2005  Manish Singh  <yosh@gimp.org>
 
        * gdk/gdkcursor.h: remove GDK_CURSOR and GDK_IS_CURSOR, instance
index 28bae282d4859cb55a4727281c9cced835cb6295..5f7191907778795c35a3213e650d2c37bc71d56a 100644 (file)
@@ -1,3 +1,10 @@
+2005-06-18  Kristian Rietveld  <kris@gtk.org>
+
+       * gtk/gtktreeview.c (gtk_tree_view_bin_expose): undo merging
+       of the separate loop setting cell data with cell drawing loop
+       (introduced in revision 1.280), since this breaks focus handling
+       wrt special cells.
+
 Sat Jun 18 04:22:51 2005  Manish Singh  <yosh@gimp.org>
 
        * gdk/gdkcursor.h: remove GDK_CURSOR and GDK_IS_CURSOR, instance
index cb63d4df17cfc829a5e6e867effb011255bc4274..8f179bae9738fde13d976dd5f2ccb2cd2db6da6b 100644 (file)
@@ -3559,6 +3559,22 @@ gtk_tree_view_bin_expose (GtkWidget      *widget,
 
       parity = _gtk_rbtree_node_find_parity (tree, node);
 
+      /* we *need* to set cell data on all cells before the call
+       * to _has_special_cell, else _has_special_cell() does not
+       * return a correct value.
+       */
+      for (list = (rtl ? g_list_last (tree_view->priv->columns) : g_list_first (tree_view->priv->columns));
+          list;
+          list = (rtl ? list->prev : list->next))
+        {
+         GtkTreeViewColumn *column = list->data;
+         gtk_tree_view_column_cell_set_cell_data (column,
+                                                  tree_view->priv->model,
+                                                  &iter,
+                                                  GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_IS_PARENT),
+                                                  node->children?TRUE:FALSE);
+        }
+
       has_special_cell = gtk_tree_view_has_special_cell (tree_view);
 
       for (list = (rtl ? g_list_last (tree_view->priv->columns) : g_list_first (tree_view->priv->columns));
@@ -3604,12 +3620,6 @@ gtk_tree_view_bin_expose (GtkWidget      *widget,
              continue;
            }
 
-         gtk_tree_view_column_cell_set_cell_data (column,
-                                                  tree_view->priv->model,
-                                                  &iter,
-                                                  GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_IS_PARENT),
-                                                  node->children?TRUE:FALSE);
-
           /* Select the detail for drawing the cell.  relevant
            * factors are parity, sortedness, and whether to
            * display rules.